<%let isText=!message.add?'button':'text';%>
<div class="infoHead"><div class="line"></div><span class="infoTitle">添加</span></div>
<div class="infoBody">
	<div class="row routeRow">
		<div class="left">
			<p>建设地点</p>
			<input class="input" id="pointAddress" type="<%- isText%>" placeholder="请输入建设地点" value="<%- message.pointName%>">
		</div>
		<div class="right">
			<p>使用寿命</p>
			<input class="input" id="useTime" type="<%- isText%>" placeholder="请输入使用寿命" value="<%- message.useTime%>" oninput="value=value.replace(/[^\d]/g,'')">
		</div>
	</div>
	<div class="row">
		<div class="left">
			<p>器材厂家</p>
			<input class="input" id="manufacturer" type="<%- isText%>" placeholder="请输入器材厂家" value="<%- message.manufacturer%>">
		</div>
		<div class="right">
			<p>建设时间</p>
			<input class="input" id="buildTime" type="button" placeholder="请选择建设时间" value="<%- message.buildTime%>">
		</div>
		
	</div>
	<div class="row">
		<div class="left">
			<p>所属街道</p>
			<select class="mySelect" id="routeStreet">
				<%$.each(message.tree,function(index,el){
					if(message.townId==el.id){%>
						<option value="<%- el.id%>" selected><%- el.name%></option>
					<%}else{%>
						<option value="<%- el.id%>"><%- el.name%></option>
					<%}
				})%>
			</select>
		</div>
		<div class="right">
			<p>联系人</p>
			<input class="input" id="linkman" type="<%- isText%>" placeholder="请输入联系人" value="<%- message.linkman%>">
		</div>
	</div>
	<div class="row">
		<div class="left" style="position: relative;">
			<p>所属社区</p>
			<select class="mySelect" id="routeVillage"></select>
		</div>
		<div class="right">
			<p>联系电话</p>
			<input class="input" id="linkphone" type="<%- isText%>" placeholder="请输入联系电话" value="<%- message.linkphone%>" oninput="value=value.replace(/[^\d]/g,'')">
		</div>
	</div>
	<div class="row">
		<div class="left">
			<p>器材类别</p>
			<select class="mySelect" id="equipmentType">
				<option value="1">体彩</option>
				<option value="2">自建</option>
			</select>
		</div>
		<div class="right">
			<p>器材数量</p>
			<input class="input" id="equipmentNum" type="<%- isText%>" placeholder="请输入器材数量" value="<%- message.equipmentNum%>" oninput="value=value.replace(/[^\d]/g,'')">
		</div>
	</div>
	<div class="row">
		<div class="left">
			<p>经/纬度</p>
			<input class="input mapInput" id="lng" type="button" style="width: 3rem" lng="<%- message.longitude%>" lat="<%- message.latitude%>" value="<%- message.longitude?message.longitude+'/'+message.latitude:''%>">
			<input class="input mapButton" id="showMap" type="button" value="点击" style="text-align: center;">
		</div>
		<div class="right"></div>
	</div>
	<div class="row" style="height: 1.3rem">
		<textarea name="" id="routeMsg" cols="30" rows="10" value='<%- message.remark%>' placeholder="请输入备注信息"><%- message.remark%></textarea>
	</div>
	<%if(message.pics){if(message.pics.length!=0){
		let imgUrl = window.location.host;
        let hd = imgUrl.split('.njdtwise')[0]
        imgUrl = hd == 'www' ? 'http://www.njdtwise.com/images/' : 'http://dev.njdtwise.com/images/';%>
		<div class="row" style="display: block;">
			<%$.each(message.pics,function(index,el){let _url=imgUrl+el.filePath;%>
				<img src="<%- _url%>" style="max-width: 32%">
			<%})%>
		</div>
		<%}
	}%>
</div>
<div class="submit">
	<input type="button" class="buttonBlue" id="submit" value="<%- message.btnText%>">
</div>
<img src="img/user/6904332C-0AF0-402E-B315-6EE99B1DC08B@3x.png" class="closeInfo" id="closeInfo">
<div class="routeMap">
	<div class="maphead">
        <input type="text" class="form-control" id="searchMap" placeholder="请输入您要搜索的地址">
        <img src="img/common/search.png" id="searchMapButton" style="cursor: pointer;">
    </div>
    <div class="mapBody" id="routeMap"></div>
    <div class="mapfooter">
        <button type="button" class="btn btn-default mapSet" id="cancel" style="margin-right: 30px;">取消</button>
        <button type="button" class="btn btn-info mapSet" id="confirm" style="background-color: #5bc0de;color:#fff">确定</button>
    </div>
</div>